package com.topone.service;

import com.topone.dataObject.Bussiness;
import com.topone.dataObject.ShopApply;
import com.topone.dto.BussinessDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;

/**
 * 商家的增删改查操作
 * Created by Administrator on 2017/11/6,0006.
 */
public interface BussinessService {

       //根据商家code和id查询商家信息
       Bussiness findOne(String bussinessCode, String bussinessId);

       //根据商家名查询商家信息
       Bussiness findByBussinessName(String bussinessName, Integer status);

       //查询所有商家信息
       Page<Bussiness> findAll(Pageable pageable);

       //查询所有入驻商家
       Page<Bussiness> findUpAll(Integer bussinessStatus, Pageable pageable);

       //新增或者修改商家信息
       Bussiness save(Bussiness bussiness, ShopApply shopApply);

       //根据商家名称模糊查询
       List<BussinessDTO> findBussinessNameList(String bussinessName);

       //后台商家列表查询
       Page<Bussiness> findList(String bussinessCode, Pageable pageable);

       //查询所有商家
       List<BussinessDTO> allBussiness(Integer status);

       //商家登录校验
       BussinessDTO checkBussinessPassword(String  bussinesspassword, String bussinessPhone);
}